<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('项目发票')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
    	<h4 class="form-header h4">基础信息</h4>
        <form class="form-horizontal m" id="form-project-edit" th:object="${gcProject}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目编号：</label>
               	<div class="col-sm-8" style="padding-top: 8px;">
                	<span style="text-align: right;" th:text="*{orderNo}"></span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位名称：</label>
               	<div class="col-sm-8" style="padding-top: 8px;">
                	<span style="text-align: right;" th:text="*{customerName}"></span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                    <span style="text-align: right;" th:text="*{name}"></span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">总金额：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                	<span style="text-align: right;" th:text="*{zongje}"></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                    <span style="text-align: right;" th:text="*{descs}"></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设计图纸：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                    <span style="text-align: right;" th:text="*{sjts}"></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">其他文件：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                    <span style="text-align: right;" th:text="*{qtwj}"></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">成本评估：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                    <span style="text-align: right;" th:text="*{cbpj}"></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">造价、报价：</label>
                <div class="col-sm-8" style="padding-top: 8px;">
                    <span style="text-align: right;" th:text="*{zjbj}"></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">发票金额：</label>
                <div class="col-sm-8">
                    <input name="fapiao" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">上传发票：</label>
                <div class="col-sm-8">
                    <textarea name="fapiaofile" class="form-control"></textarea>
                </div>
            </div>
        </form>
	    <div class="col-sm-12" style="top:15px;">
	    	工程其他合同
			<table id="bootstrap-table"></table>
	    </div>
	    <div class="col-sm-12" style="top:15px;">
	    	设备材料合同
			<table id="sbclht"></table>
	    </div>
	    <div class="col-sm-12" style="top:15px;">
	    	施工安装合同
			<table id="sgazht"></table>
	    </div>
	    <div class="col-sm-12" style="top:15px;">
	    	一般性费用
			<table id="ybfy"></table>
	    </div>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/project";
        $("#form-project-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/addFapiaoSave", $('#form-project-edit').serialize());
            }
        }
        
        $(function() {
            var options = {
                data: [[${otherlis}]],
                modalName: "工程其他合同",
                showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
		        pagination: false,
                columns: [
				{
				    field: 'orderNo',
				    title: '编号'
				},
                {
                    field: 'name',
                    title: '名称'
                },
                {
                    field: 'zongje',
                    title: '总金额'
                },
                {
                    field: 'descs',
                    title: '描述'
                }]
            };
            $.table.init(options);
            
            
            var optionssbclht = {
            	id: "sbclht",
                data: [[${sbclhtlist}]],
                modalName: "设备材料合同",
                showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
		        pagination: false,
                columns: [
				{
				    field: 'orderNo',
				    title: '编号'
				},
                {
                    field: 'name',
                    title: '名称'
                },
                {
                    field: 'zongje',
                    title: '总金额'
                },
                {
                    field: 'descs',
                    title: '描述'
                }]
            };
            $.table.init(optionssbclht);
            
            var optionsgazht = {
            	id: "sgazht",
                data: [[${sgazhtlist}]],
                modalName: "施工安装合同",
                showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
		        pagination: false,
                columns: [
				{
				    field: 'orderNo',
				    title: '编号'
				},
                {
                    field: 'name',
                    title: '名称'
                },
                {
                    field: 'zongje',
                    title: '总金额'
                },
                {
                    field: 'descs',
                    title: '描述'
                }]
            };
            $.table.init(optionsgazht);
            
            var optionybfy = {
            	id: "ybfy",
                data: [[${ybfylist}]],
                modalName: "一般性费用",
                showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
		        pagination: false,
                columns: [
				{
				    field: 'orderNo',
				    title: '编号'
				},
                {
                    field: 'name',
                    title: '名称'
                },
                {
                    field: 'zongje',
                    title: '总金额'
                },
                {
                    field: 'descs',
                    title: '描述'
                }]
            };
            $.table.init(optionybfy);
        });
        
    </script>
</body>
</html>